GtkFileChooserNativeWin32: Uninitialize COM at end of thread
authorLuca Bacci <luca.bacci982@gmail.com>
Tue, 16 Jul 2019 10:43:43 +0000 (12:43 +0200)
committerLuca Bacci <luca.bacci982@gmail.com>
Sun, 4 Aug 2019 16:03:37 +0000 (18:03 +0200)
GtkFileChooserNativeWin32 is created and shown on a secondary thread.
This thread initializes COM support with CoInitializeEx but does not
finalize it, so we have a leak. Fix that by calling CoUninitialize()
before thread terminates.

See Merge Request !1043

gtk/gtkfilechoosernativewin32.c

index 4bab4ef00f8d71e4e49c56202877b7d5c8feedeb..3bb81be29cc5c21838861276296005cb0cd9015b 100644 (file)
@@ -792,6 +792,8 @@ filechooser_win32_thread (gpointer _data)
 
   IFileDialog_Release ((IUnknown *)pfd);
 
+  CoUninitialize();
+
   g_main_context_invoke (NULL,
                          filechooser_win32_thread_done,
                          data);